findElementById

public abstract Optional<Element> findElementById(String id)

Returns the first Element object found in the current search context by the given id. Returns an empty Optional if no element was found.

Parameters

id

a string that represents the id attribute of the HTML element

Throws

if the given id is empty

when this instance is closed